﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using PJ.Framework;
using PJ.Framework.Common;

namespace PJ.AppPOS
{
    /// <summary>
    /// Logique d'interaction pour App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            try
            {
                Bootstrapper bootStrapper = new Bootstrapper();
                bootStrapper.Run();
            }
            catch (Exception ex)
            {
                bool rethrow = ExceptionManager.Handle(ex);
                MessageBox.Show(ex.Message);
                if (rethrow)
                    throw ex;
            }
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            Log.WriteApplicationStart();
            base.OnStartup(e);
        }
        protected override void OnExit(ExitEventArgs e)
        {
            base.OnExit(e);
            Log.WriteApplicationStop();
        }
    }
}
